﻿{include file="public/header" /}
<title>我的桌面</title>
</head>

<body>
	<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index/wang_editor')}">
	    <div id="div1" class="toolbar" style="background-color: #d4cece;">
	    </div>
	    <div id="div2" class="text" style="height: 500px;background-color: #f7f7f7;" >
	    </div>
	    <div>
	    	<input type="button" id='saver' value="保存"> 
	    </div>
	    <textarea name="content" id="content" style="display: none;"></textarea>
	    
	    
	    
	    
	    
	</from>
{include file="public/footer" /}
<script type="text/javascript" src="__PUBLIC__/static/release/wangEditor.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/assist.js"></script>
<script type="text/javascript">
        var E = window.wangEditor
        var editor1 = new E('#div1', '#div2')
        editor1.customConfig.uploadImgShowBase64 = true
        editor1.create()
       
		editor1.txt.html('{$data.content}')

		//保存数据
        $("#saver").click(function(){
        	
        	$('#content').val(editor1.txt.html());
        	
        	ajaxForm();
        	
        	
        })
</script>